// import {baseConfig} from "@/plugins/z-frame/hooks/form";

let formDef = {
  type: 'object',
  ui: {
    attrs: [
      ['label-width', '100px']
    ],
  },
  properties: {
    // name: {
    //   type: 'string',
    //   ui: {
    //     label: '名称',
    //     widgetConfig: {
    //     }
    //   },
    //   hidden: true,
    // },
    parts: {
      type: 'array',
      ui: {
        label: "部分"
      },
      items: {
        type: "object",
        properties: {
          // type: {
          //   type: 'string',
          //   ui: {
          //     label: '类型',
          //     events: {
          //     }
          //   },
          // },
          layouts: {
            type: 'string',
            tag: 'div',
            ui: {
              label: ' ',
              widget: 'CusLayoutEditor2',
              form_item: {
                labelWidth: '0px',
              },
              widgetConfig: {
                // suffix: 'slayout',
                mode: 'xml',
                weapp: false,
                dragLib: 'none'
              }
            }
          },
        }
      }
    },
  }
}

let computed = {}

let _config = globalThis.zformHelper.baseConfig({
  defaultVal: {
    form2: {
      name: ZY.nid(),
      computed: '{}',
      parts: [
        {
          type: 'form',
          name: 'form_' + ZY.rid(6),
          ui: '{}',
          props: '{links: [], deps: [], posMap: []}',
          properties: '{}',
          // defaultVal: '{}',
          slots: []
        }
      ]
    }
  },
  computed,
  def: formDef,
});

export default _config
